[#include "/WEB-INF/pages/common/taglibs.ftl"]
		<div class="contenttitle radiusbottom0">
	    	<h2 class="table"><span>文章维护</span></h2>
	    </div>
		<form action="[@c.url value='/manage/Article_${act}.action?backurl=${action.urlEncode(action.backurl)}'/]" method="post">
			<input type="hidden" name="id" value="${(article.id)!''}" />
			<input type="hidden" name="article.id" value="${(article.id)!''}" />
			<table cellspacing="0" cellpadding="0" border="0" class="stdtable-form">
				<thead>
					<tr>
						<th class="head0"></th>
						<th class="head1"></th>
						<th class="head0"></th>
						<th class="head1"></th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td>所属：[#--[@fmt.message key="manage.category"/] --]</td>
						<td>
							<select name="article.categoryId" class="">
							[#list categoryList as c]
								<option value="${c.id}" [#if ((article.categoryId)?? && article.categoryId == c.id) || pid==c.id]selected="selected"[/#if] >${c.name}</option>
							[/#list]
							</select>
						</td>
						<td>类型：[#--[@fmt.message key="manage.article.type"/]--]</td>
						<td>
							<select name="article.type" disabled="disabled" class="atomicinput" >
								<option value="${formId}" selected="selected">${(form.name)!''}</option>										
							</select>
							<input type="hidden" name="article.type" value="${formId}"/>
						</td>
					</tr>
					[#assign _formItem = action.getItem('title')]
					[#if _formItem == null || _formItem.enabled == true]
						<tr>
							<td>${_formItem.title}：</td>
							<td colspan=3><input type="text" class="smallinput" placeholder="?" rel="${action.getValidateMetadata("/manage", "Article_${act}", "article.title")}" name="article.title" value="${(article.title)!''}"/></td>
						</tr>
					[/#if]
					
					[#assign _formItem = action.getItem('shortTitle')]
					[#if _formItem == null || _formItem.enabled == true]
						<tr>
							<td>${_formItem.title}：</td>
							<td><input type="text"  placeholder="?" name="article.shortTitle" value="${(article.shortTitle)!''}"/></td>
							<td>1</td>
							<td>2</td>
						</tr>
					[/#if]
				
					[#assign _formItem1 = action.getItem('origin')]
					[#assign _formItem2 = action.getItem('author')]
					[#if _formItem1.enabled != false || _formItem2.enabled != false]
						<tr>
							[#if _formItem1.enabled == true]
								<td>${_formItem1.title}：</td>
								<td><input type="text" placeholder="?" name="article.origin" value="${(article.origin)!''}"/></td>
							[/#if]
							[#if _formItem2.enabled == true]
								<td>${_formItem2.title}：</td>
								<td><input type="text" class="smallinput" placeholder="?" name="article.author" value="${(article.author)!''}"/></td>
							[/#if]
							[#if _formItem1.enabled != _formItem2.enabled]
								<td></td>
								<td></td>
							[/#if]
						</tr>
					[/#if]
					
					
					[#assign _formItem1 = action.getItem('keyWords')]
					[#assign _formItem2 = action.getItem('tags')]
					[#if _formItem1.enabled != false || _formItem2.enabled != false]
						<tr>
							[#if _formItem1.enabled == true]
								<td>${_formItem1.title}：</td>
								<td><input type="text" class="smallinput" placeholder="?" name="article.keyWords" value="${(article.keyWords)!''}"/></td>
							[/#if]
							[#if _formItem2.enabled == true]
								<td>${_formItem2.title}：</td>
								<td><input type="text" class="smallinput" placeholder="?" name="article.tags" value="${(article.tags)!''}"/></td>
							[/#if]
							[#if _formItem1.enabled != _formItem2.enabled]
								<td></td>
								<td></td>
							[/#if]
						</tr>
					[/#if]
					
					[#assign _formItem = action.getItem('description')]
					[#if _formItem == null || _formItem.enabled == true]
						<tr>
							<td>${_formItem.title}：</td>
							<td colspan="3"><textarea maxlength="255" class="longinput" name="article.description">${(article.description)!''}</textarea></td>
						</tr>
					[/#if]
					
					[#assign _formItem1 = action.getItem('topLevel')]
					[#assign _formItem2 = action.getItem('checkLevel')]
					[#if _formItem1.enabled != false || _formItem2.enabled != false]
						<tr>
							[#if _formItem1.enabled == true]
								<td>${_formItem1.title}：</td>
								<td><input type="text" class="atomicinput" placeholder="?" name="article.topLevel" value="${(article.topLevel)!''}"/></td>
							[/#if]
							[#if _formItem2.enabled == true]
								<td>${_formItem2.title}：</td>
								<td><input type="text" class="atomicinput" placeholder="?" name="article.checkLevel" value="${(article.checkLevel)!''}"/></td>
							[/#if]
							[#if _formItem1.enabled != _formItem2.enabled]
								<td></td>
								<td></td>
							[/#if]
						</tr>
					[/#if]
					[#assign _formItem1 = action.getItem('outerUrl')]
					[#assign _formItem2 = action.getItem('publishDate')]
					[#if _formItem1.enabled != false || _formItem2.enabled != false]
						<tr>
							[#if _formItem1.enabled == true]
								<td>${(_formItem1.title)!'外部链接'}：</td>
								<td><input type="text" placeholder="?" name="article.outerUrl" value="${(article.outerUrl)!''}"/></td>
							[/#if]
							[#if _formItem2.enabled == true]
								<td>${(_formItem2.title)!'发布时间'}：</td>
								<td><input type="text" placeholder="?" readonly="readonly" class="datepicker" name="article.publishDate" value="[#if (article.publishDate)??]${(article.publishDate)?string('yyyy-MM-dd')}[/#if]"/></td>
							[/#if]
							[#if _formItem1.enabled != _formItem2.enabled]
								<td></td>
								<td></td>
							[/#if]
						</tr>
					[/#if]
					[#assign _formItem1 = action.getItem('i18n')]
					[#assign _formItem2 = action.getItem('notes')]
					[#if _formItem1.enabled != false || _formItem2.enabled != false]
						<tr>
							[#if _formItem1.enabled == true]
								<td>${(_formItem1.title)!'文章语言'}：</td>
								<td><select name="article.i18n">
									[#list configI18N.configItemList as item]
										<option value="${item.value}" [#if (article.i18n)?? && item.value==article.i18n]selected="selected"[/#if]>${item.name}</option>
									[/#list]
									</select>
								</td>
							[/#if]
							[#if _formItem2.enabled == true]
								<td>${(_formItem2.title)!'备注'}：</td>
								<td><textarea placeholder="?" class="longinput" name="article.notes">${(article.notes)!''}</textarea></td>
							[/#if]
							[#if _formItem1.enabled != _formItem2.enabled]
								<td></td>
								<td></td>
							[/#if]
						</tr>
					[/#if]
					[#assign _formItem1 = action.getItem('check')]
					[#assign _formItem2 = action.getItem('permission')]
					[#if _formItem1.enabled != false || _formItem2.enabled != false]
						<tr>
						[#if _formItem1.enabled == true]
							<td>${(_formItem1.title)!'需要审核'}：</td>
							<td>
								<input type="checkbox" class="yes_no" rel="{labelOn: '免审', labelOff: '待审 ', easing: 'easeOutBounce', duration: 800}" name="article.check" value="true" [#if article == null || (article.isCheck() == true)]checked="checked"[/#if]></input>
								[#--<div style="margin-left:90px;margin-bottom:4px;line-height:12px;">
									[#if article == null || (article.isCheck() == true)]
										[#if article == null || (article.reject) == true]
											<label>审核通过</label>
										[#else]
											<label>审核未通过</label>
										[/#if]
									[/#if]
								</div>--]
							[#--是：<input type="radio" name="article.check" value="true" [#if article == null || (article.check == true)]checked[/#if]/>
							否：<input type="radio" name="article.check" value="false" [#if (article != null && article.check == false)]checked[/#if] />--]
						</td>
						[/#if]
						[#if _formItem2.enabled == true]
							<td>${(_formItem2.title)!'访问权限'}：</td>
							<td>
								<input type="checkbox" class="yes_no" rel="{labelOn: '开放', labelOff: '授权', easing: 'easeOutBounce', duration: 800}" name="article.permission" value="true" [#if article == null || (article.isPermission() == true)]checked="checked"[/#if]></input>
							</td>
						[/#if]
						[#if _formItem1.enabled != _formItem2.enabled]
							<td></td>
							<td></td>
						[/#if]
						</tr>
					[/#if]
					<tr>
						<td>发布：</td>
						<td><select name="article.draft">
								<option value="false" [#if (article == null || article.isDraft() == false)]checked[/#if]>正式</option>
								<option value="true" [#if (article != null && article.isDraft() == true)]checked[/#if]>草稿</option>
							</select>
						</td>
						[#assign _formItem = action.getItem('recommend')]
						[#if _formItem == null || _formItem.enabled == true]
							<td>${(_formItem.title)!'是否推荐'}：</td>
							<td> 
								<input type="checkbox" class="yes_no" rel="{labelOn: '推荐', labelOff: '一般', easing: 'easeOutBounce', duration: 800}" name="article.recommend" value="true" [#if article == null || (article.isRecommend() == true)]checked="checked"[/#if]></input>
							</td>
						[#else]
							<td></td>
							<td></td>
						[/#if]
					</tr>
					<tr>
						<td>允许评论：</td>
						<td>
							<input type="checkbox" class="yes_no" rel="{labelOn: '允许', labelOff: '拒绝', easing: 'easeOutBounce', duration: 800}" name="article.comment" value="true" [#if article == null || (article.isComment() == true)]checked="checked"[/#if]></input>
							[#if article == null || (article.comment ==true)]评论数量：${(article.commentCount)!0}[/#if]
						</td>
						<td>分析统计：</td>
						<td>是：<input type="radio" name="article.analyse" value="true" [#if article == null || (article.analyse ==true)]checked[/#if]/>
							否：<input type="radio" name="article.analyse" value="false" [#if (article != null && article.analyse == false)]checked[/#if] />
						</td>
					</tr>
					<tr>
						<td>缩略图：</td>
						<td style="padding-bottom:1px;"><div style="margin-left:5px;text-align:left;vertical-align:middle;">
								[#assign thumb="${(article.titleImg)!'/images/thumb_80x80.png'}" /]
								<img id="thumb" src="[@c.url value='${thumb}'/]" style="" />
								<input type="hidden" id="titleImg" name="article.titleImg"/>
							</div>
							 <ul class="buttonlist" style="margin:12px 1px 0px 4px;">
								<li style="margin-bottom:0px;"><button actkey="thumb" actval="kcfinder_div" class="stdbtn btn_orange" style="opacity: 1;">选择缩略图</button></li>
								<li style="margin-bottom:0px;"><button id="cutImage" class="stdbtn btn_orange" style="opacity: 1;">制作缩略图</button></li>
								<li style="margin-bottom:0px;"><button id="defaultImage" class="stdbtn btn_orange" style="opacity: 1;">使用默认</button></li>
								<li style="text-align:right;"><small>120x90</small></li>
				            </ul>
							<div id="kcfinder_div"></div>
						</td>
						<td>是否索引：</td>
						<td>是：<input type="radio" name="article.index" value="true" [#if article == null || (article.index ==true)]checked[/#if]/>
							否：<input type="radio" name="article.index" value="false" [#if (article != null && article.index == false)]checked[/#if] />
						</td>
					</tr>
					<tr>
						<td>模板</td>
						<td colspan="3">
							<select name="article.templateId" rel="${action.getValidateMetadata("/manage", "Article_${act}", "article.templateId")}">
								<option value=""></option>
								[#list templateList as template]
									<option value="${template.id}" [#if (article.templateId)?? && template.id==article.templateId]selected="selected"[/#if] >${template.name}</option>
								[/#list]
							</select><input id="templateEdit" type="button" value="编辑"/>
						</td>
					</tr>
					[#--<tr>
						<td>内容图片设置：</td>
						<td>
							<p>
						        <div class="fileupload-buttonbar">
									<div class="span2">
						                <span class="btn btn-success fileinput-button">
						                    <i class="icon-plus icon-white"></i>
						                    <span></span>
						                    <input type="button" name="article.contentImg" value="${(article.contentImg)!''}"/>
						                </span>
						                <button type="submit" class="btn btn-primary start">
						                    <i class="icon-upload icon-white"></i>
						                    <span></span>
						                </button>
									</div>
				        		</div>
				        		<div class="fileupload-loading"></div>
							</p>
						</td>
						<td>预览：</td>
						<td>
							<img src='${(article.contentImg)!''}'/>
						</td>
					</tr>--]
					<tr>
						<td colspan=4><hr></td>
					</tr>
					<tr>
						<td colspan=4>
							[#assign artUuid = _Utils.uuid()]
							<textarea cols="80" id="CKEditor" name="article.articleContent.content" rows="10" >
								[#if (article.contentList)??]
									[#list article.contentList as content]
										[#-- 不转义html实体 --]
										[#escape content as content?html]
										${(content.content)!''}
										[/#escape]
										[#if content_has_next]
											<div page="true" style="page-break-after: always;">
												<span style="display: none;">[page]&nbsp;[/page]</span>
											</div>
											<p>&nbsp;</p>
										[/#if]
									[/#list]
								[/#if]
							</textarea>
						</td>
					</tr>
					<tr>
						<td colspan="4">
							<button class="submit ">提&nbsp;&nbsp;交</button>
							<input type="reset" class="reset radius2" value="重&nbsp;&nbsp;置">
							<input type="button" class="reset radius2" value="预&nbsp;&nbsp;览" id="templateReview">
							<a style="margin-left: 6px; background-color: rgb(247, 247, 247); border-color: rgb(204, 204, 204); color: rgb(51, 51, 51);" href="${action.backurl}" class="anchorbutton button_alert">
								<span style="line-height: 21px; background-color: rgb(255, 255, 255); border-color: rgb(221, 221, 221);">返&nbsp;&nbsp;回</span>
							</a>
						</td>
					</tr>
				</tbody>
			</table>
			<br>
		</form>
		[@ckeditor.replace replace="CKEditor" basePath="${base}/js/plugins/ckeditor/" /]